/*
 * Copyright 2025 arisgo@163.com
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.arisgo.cloud.attendance.clazz.entity;

import com.arisgo.cloud.web.model.NumberIdWithTime;
import com.mybatisflex.annotation.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalTime;

/**
 * 班详情
 * 存储内容和 att_class_segment内容相同
 *
 * @author Coulson
 * @since 2024-12-31
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Table("att_class_detail")
public class ClassDetail extends NumberIdWithTime {

    /**
     * 租户
     */
    private Long tenantId;
    /**
     * 班次
     */
    private Long classId;
    /**
     * 开始时间
     */
    private LocalTime startTime;
    /**
     * 结束时间
     */
    private LocalTime endTime;
    /**
     * 时长（h）包含休息时间
     */
    private BigDecimal duration;
    /**
     * 休息开始时间
     */
    private LocalTime restStartTime;
    /**
     * 休息结束时间
     */
    private LocalTime restEndTime;

    public static final String TENANT_ID = "tenant_id";
    public static final String CLASS_ID = "class_id";
    public static final String START_TIME = "start_time";
    public static final String END_TIME = "end_time";
    public static final String DURATION = "duration";
    public static final String REST_START_TIME = "rest_start_time";
    public static final String REST_END_TIME = "rest_end_time";
}
